#include "LibPrintf.h"

#ifdef __AVR__
#ifndef PRINTF_PREVENT_DEFAULT_AVR_SETTINGS
#define PRINTF_DISABLE_SUPPORT_EXPONENTIAL
#define PRINTF_DISABLE_SUPPORT_LONG_LONG
#endif
#endif

// We include `printf.c` hear so we can actually control the default settings without
// modifying the original source file
#include "printf.c"
#include "mcu.h"


#ifdef ARDUINO
//static Print &print_instance;

void printf_init(Print &PrintClass) {
//    print_instance = PrintClass;
}

// If you use the default printf() implementation, this function will route the output
// to the Serial class
extern "C" __attribute__((weak)) void _putchar(char character) {
    serial_putchar(character);
}
#endif
